package com.its.client;

import com.its.fialBack.UserServiceFailBack;
import com.its.pojo.User;
import com.its.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 朱厚强
 * @version 1.0
 * @classname UserClient
 */
//指定在哪使用
@FeignClient(value = "User-Service",fallbackFactory = UserServiceFailBack.class)
public interface UserServiceClient {
    /* id查询
     * @param id
     * @return
     */
    @GetMapping("/user/getById/{id}")
    Result<User> queryById(@PathVariable("id") Long id);
}
